1. Field of the Invention
This invention relates to the field of mass storage device, and more particularly, to a window-based flash memory storage system and a management method and an access method thereof.
2. Description of Related Art
A flash memory storage system is typically composed of two main components: a flash memory unit and an access controller; wherein the flash memory unit is used for data storage, while the access controller is used to control the access operation from the CPU to the flash memory as well as manage the data storage space of the flash memory. The access controller is typically composed of a microprocessor, a ROM unit, an SRAM unit, a flash memory interface, and a CPU interface; wherein the ROM unit is used to store the program code running on the microprocessor; the SRAM unit is used to store window-related information and also serves as a data buffer between the flash memory and the CPU; the CPU interface is used to allow the access controller to communicate with the CPU; and the flash memory interface is used to allow the access controller to gain access to the data stored in the flash memory.
The data storage space of the flash memory is partitioned into a plurality of blocks, and most blocks are categorized into a number of subgroups, called windows. We use some specific blocks to record the related information of each window (hereinafter referred to as window information). In order to reduce SRAM cost, a common practice is to store all the window information in the flash memory and only a part of the window information that is essential to window operation is loaded to the SRAM.
When it is desired to perform a read/write operation on a certain window, it is required to first load the associated window information of this window into the SRAM. In the event of a sudden power failure, however, some newly-updated window information currently stored in the SRAM would be lost, and thus the flash memory still stores the old version of the window information. Consequently, in the next operation of the same window when power is resumed to normal, the older version of the window information will be loaded to the SRAM, resulting in the use of incorrect window information.
Furthermore, when a read/write operation is to be performed on a certain sector of the active window, it would involve many stages of operations. If there are two sectors to be accessed, the currently used method is to execute the read/write operation on the first sector until all the stages are completed and then proceed to the read/write operation on the next sector. This sequential access method is undoubtedly low in efficiency. One conventional solution to this problem is to use two or more flash memory banks to perform an interleaving read/write operation to help increase the access speed. One drawback to this solution, however, is that it is limited in functionality and would have the penalty of an overly large power consumption.